package org.huawei260.String;

import java.util.Scanner;

/**
 * @Auther: qingle
 * @Date: 2024/10/24-16:15
 * @Description: 相对开音节构成的结构为:辅音 + 元音(aeiou)+ 辅音(r除外) + e
 * @version: 1.0
 */
public class O0045_相对开音节_AI {
		public static void main(String[] args) {
			Scanner scanner = new Scanner(System.in);
			String line = scanner.nextLine();
			scanner.close();

			String[] words = line.split(" ");
			int count = 0;

			for (String word : words) {
				if (word.matches("[a-z]+")) {
					// 反转单词
					char[] chars = word.toCharArray();
					for (int i = 0, j = chars.length - 1; i < j; i++, j--) {
						char temp = chars[i];
						chars[i] = chars[j];
						chars[j] = temp;
					}
					word = new String(chars);
				}

				// 检查相对开音节
				for (int i = 0; i <= word.length() - 4; i++) {
					if (isConsonant(word.charAt(i)) &&
						isVowel(word.charAt(i + 1)) &&
						isConsonant(word.charAt(i + 2)) &&
						word.charAt(i + 2) != 'r' &&
						word.charAt(i + 3) == 'e') {
						count++;
					}
				}
			}

			System.out.println(count);
		}

		private static boolean isVowel(char c) {
			return "aeiou".indexOf(c) != -1;
		}

		private static boolean isConsonant(char c) {
			return "bcdfghjklmnpqrstvwxyz".indexOf(c) != -1;
		}
	}